package com.hmall.order.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hmall.order.pojo.OrderDetail;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface OrderDetailMapper extends BaseMapper<OrderDetail> {
    @Select(" select od.* from tb_order o,tb_order_detail od  " +
            "  where o.id=od.order_id and  o.status = 1 " +
            "   and TIMESTAMPDIFF(MINUTE,o.create_time,DATE_FORMAT(NOW(), '%Y-%m-%d %H:%i:%S'))>=5")
    List<OrderDetail> queryTimeoutOrderDetail();
}
